/**
 * Copyright &copy; 2016-2022 <a href="http://www.xxxx.com">xxxx</a> All rights reserved.
 */
package com.channelsharing.hongqu.portal.api.controller.banner;

import com.channelsharing.common.entity.Paging;
import com.channelsharing.hongqu.portal.api.controller.BaseController;
import com.channelsharing.hongqu.portal.api.entity.Banner;
import com.channelsharing.hongqu.portal.api.service.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 轮播Controller
 *
 * @author xaioemo
 * @version 2019-03-22
 */
@Api(tags = "輪播操作接口")
@Validated
@RestController
@RequestMapping("/v1/banner")
public class BannerController extends BaseController {

    @Autowired
    private BannerService bannerService;

    @ApiOperation(value = "获取购物车列表")
    @GetMapping
    public List<Banner> findPaging() {
        // 计算商品优惠后的价格
        List<Banner> paging = bannerService.findBanners();
        return paging;
    }

}
